package com.biz.primus.search.vo.search;

import com.biz.primus.base.constant.Constant;
import com.biz.primus.base.enums.PromotionChannelEnum;
import com.biz.primus.base.enums.SearchChannel;
import com.biz.primus.base.enums.search.ProductSearchSort;
import com.biz.primus.base.global.GlobalValue;
import com.biz.primus.base.global.Ref;
import com.biz.primus.base.vo.IPromotionReqVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品搜索条件 Vo
 *
 * @author david-liu
 * @date 2017年01月07日
 * @reviewer
 */
@Data
@ApiModel("搜索条件")
public class SearchProductRequestVo implements Serializable,IPromotionReqVo {

    private static final long serialVersionUID = -2654803892537897300L;

    @ApiModelProperty("搜索关键字")
    private String keyword;

    @ApiModelProperty("搜索字段")
    private List<SearchFieldVo> fields;

    @ApiModelProperty("门店编号")
    @Ref(GlobalValue.depotCode)
    private String depotCode;

    @ApiModelProperty("门店Id")
    @Ref(GlobalValue.depotId)
    private Long shopId;

    @ApiModelProperty("分类Id")
    private Long categoryId;

    @ApiModelProperty("商品搜索排序(默认采用综合排序)")
    private ProductSearchSort sort = ProductSearchSort.DEFAULT_SORT;

    @ApiModelProperty("当前页 从0开始")
    private Integer page = Constant.DEFAULT_PAGE;

    @ApiModelProperty("页大小")
    private Integer pageSize = Constant.DEFAULT_PAGE_SIZE;

    @ApiModelProperty("定位经度")
    @Ref(GlobalValue.lat)
    private BigDecimal userLat;

    @ApiModelProperty("定位纬度")
    @Ref(GlobalValue.lon)
    private BigDecimal userLon;

    @ApiModelProperty("不用传递 门店经度")
    private BigDecimal depotLat;

    @ApiModelProperty("不用传递 门店纬度")
    private BigDecimal depotLon;

    @ApiModelProperty("是否为立即送模式  默认为普通送模式")
    private Boolean depotProduct;

    @ApiModelProperty("商品类型 填写1为B类商品")
    private Integer type;

    @ApiModelProperty("促销活动渠道")
    private PromotionChannelEnum appChannel;

    @ApiModelProperty("搜索渠道")
    private SearchChannel searchChannel;

    @ApiModelProperty("城市Id")
    @Ref(GlobalValue.cityId)
    private Long cityId;

    @ApiModelProperty("不用传递 区域Id")
    private Long zoneId;

    @ApiModelProperty("省Id")
    @Ref(GlobalValue.provinceId)
    private Long provinceId;

    @ApiModelProperty("用户Id")
    @Ref(GlobalValue.memberId)
    private Long memberId;

    @Override
    public Boolean getUserFirstOrder() {
        return Boolean.FALSE;
    }

}
